package com.oa.admin.service;

import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.joneying.common.web.response.Resp;
import com.oa.admin.dto.PurchaseRequestAddDTO;
import com.oa.admin.dto.PurchaseRequestListDTO;
import com.oa.admin.vo.PurchaseRequestDetailsVO;
import com.oa.admin.vo.PurchaseRequestListVO;
import com.oa.core.PageResult;
import com.oa.admin.entity.PurchaseRequest;
import com.baomidou.mybatisplus.service.IService;
import com.oa.core.exception.BusinessException;
import com.oa.core.exception.DataIsEmptyException;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * <p>
 * 采购申请表 服务类
 * </p>
 *
 * @author syb123
 * @since 2019-01-22
 */
public interface IPurchaseRequestService extends IService<PurchaseRequest> {
    /**
     * 自定义分页
     * @param pageNum
     * @param pageSize
     * @return
     */
    PageResult<PurchaseRequest> findList(Integer pageNum, Integer pageSize);

    /**
    * 根据id查询
    */
    PurchaseRequestDetailsVO findPurchaseRequestById(String id);

    /**
     * 查询所有采购记录
     * @return
     */
    PageResult<PurchaseRequestListVO> findPurchaseRequestList(PurchaseRequestListDTO purchaseRequestListDTO);

    Resp add(PurchaseRequestAddDTO purchaseRequestAddDTO) throws BusinessException, DataIsEmptyException;

    void export(PurchaseRequestListDTO purchaseRequestListDTO, HttpServletResponse response);
}
